Optimal. Leaf size=125 \[ \frac {a^3 (4 c+3 d) \tan ^3(e+f x)}{12 f}+\frac {a^3 (4 c+3 d) \tan (e+f x)}{f}+\frac {5 a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {3 a^3 (4 c+3 d) \tan (e+f x) \sec (e+f x)}{8 f}+\frac {d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {4001, 3791, 3770, 3767, 8, 3768} \[ \frac {a^3 (4 c+3 d) \tan ^3(e+f x)}{12 f}+\frac {a^3 (4 c+3 d) \tan (e+f x)}{f}+\frac {5 a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {3 a^3 (4 c+3 d) \tan (e+f x) \sec (e+f x)}{8 f}+\frac {d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3768
Rule 3770
Rule 3791
Rule 4001
Rubi steps
\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x)) \, dx &=\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{4} (4 c+3 d) \int \sec (e+f x) (a+a \sec (e+f x))^3 \, dx\\ &=\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{4} (4 c+3 d) \int \left (a^3 \sec (e+f x)+3 a^3 \sec ^2(e+f x)+3 a^3 \sec ^3(e+f x)+a^3 \sec ^4(e+f x)\right ) \, dx\\ &=\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{4} \left (a^3 (4 c+3 d)\right ) \int \sec (e+f x) \, dx+\frac {1}{4} \left (a^3 (4 c+3 d)\right ) \int \sec ^4(e+f x) \, dx+\frac {1}{4} \left (3 a^3 (4 c+3 d)\right ) \int \sec ^2(e+f x) \, dx+\frac {1}{4} \left (3 a^3 (4 c+3 d)\right ) \int \sec ^3(e+f x) \, dx\\ &=\frac {a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{4 f}+\frac {3 a^3 (4 c+3 d) \sec (e+f x) \tan (e+f x)}{8 f}+\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{8} \left (3 a^3 (4 c+3 d)\right ) \int \sec (e+f x) \, dx-\frac {\left (a^3 (4 c+3 d)\right ) \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (e+f x)\right )}{4 f}-\frac {\left (3 a^3 (4 c+3 d)\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{4 f}\\ &=\frac {5 a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {a^3 (4 c+3 d) \tan (e+f x)}{f}+\frac {3 a^3 (4 c+3 d) \sec (e+f x) \tan (e+f x)}{8 f}+\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {a^3 (4 c+3 d) \tan ^3(e+f x)}{12 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.37, size = 273, normalized size = 2.18 \[ -\frac {a^3 (\cos (e+f x)+1)^3 \sec ^6\left (\frac {1}{2} (e+f x)\right ) \sec ^4(e+f x) \left (120 (4 c+3 d) \cos ^4(e+f x) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )\right )-\sec (e) (-24 (11 c+9 d) \sin (e)+(36 c+69 d) \sin (f x)+36 c \sin (2 e+f x)+280 c \sin (e+2 f x)-72 c \sin (3 e+2 f x)+36 c \sin (2 e+3 f x)+36 c \sin (4 e+3 f x)+88 c \sin (3 e+4 f x)+69 d \sin (2 e+f x)+264 d \sin (e+2 f x)-24 d \sin (3 e+2 f x)+45 d \sin (2 e+3 f x)+45 d \sin (4 e+3 f x)+72 d \sin (3 e+4 f x))\right )}{1536 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 161, normalized size = 1.29 \[ \frac {15 \, {\left (4 \, a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left (4 \, a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (6 \, a^{3} d + 8 \, {\left (11 \, a^{3} c + 9 \, a^{3} d\right )} \cos \left (f x + e\right )^{3} + 9 \, {\left (4 \, a^{3} c + 5 \, a^{3} d\right )} \cos \left (f x + e\right )^{2} + 8 \, {\left (a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.39, size = 188, normalized size = 1.50 \[ \frac {5 a^{3} c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f}+\frac {3 a^{3} d \tan \left (f x +e \right )}{f}+\frac {11 a^{3} c \tan \left (f x +e \right )}{3 f}+\frac {15 a^{3} d \sec \left (f x +e \right ) \tan \left (f x +e \right )}{8 f}+\frac {15 a^{3} d \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8 f}+\frac {3 a^{3} c \sec \left (f x +e \right ) \tan \left (f x +e \right )}{2 f}+\frac {a^{3} d \tan \left (f x +e \right ) \left (\sec ^{2}\left (f x +e \right )\right )}{f}+\frac {a^{3} c \tan \left (f x +e \right ) \left (\sec ^{2}\left (f x +e \right )\right )}{3 f}+\frac {a^{3} d \tan \left (f x +e \right ) \left (\sec ^{3}\left (f x +e \right )\right )}{4 f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 262, normalized size = 2.10 \[ \frac {16 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} c + 48 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} d - 3 \, a^{3} d {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 36 \, a^{3} c {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 36 \, a^{3} d {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 48 \, a^{3} c \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 144 \, a^{3} c \tan \left (f x + e\right ) + 48 \, a^{3} d \tan \left (f x + e\right )}{48 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.31, size = 203, normalized size = 1.62 \[ \frac {\left (-5\,a^3\,c-\frac {15\,a^3\,d}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+\left (\frac {55\,a^3\,c}{3}+\frac {55\,a^3\,d}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-\frac {73\,a^3\,c}{3}-\frac {73\,a^3\,d}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (11\,a^3\,c+\frac {49\,a^3\,d}{4}\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {5\,a^3\,\mathrm {atanh}\left (\frac {5\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,c+3\,d\right )}{2\,\left (10\,c+\frac {15\,d}{2}\right )}\right )\,\left (4\,c+3\,d\right )}{4\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{3} \left (\int c \sec {\left (e + f x \right )}\, dx + \int 3 c \sec ^{2}{\left (e + f x \right )}\, dx + \int 3 c \sec ^{3}{\left (e + f x \right )}\, dx + \int c \sec ^{4}{\left (e + f x \right )}\, dx + \int d \sec ^{2}{\left (e + f x \right )}\, dx + \int 3 d \sec ^{3}{\left (e + f x \right )}\, dx + \int 3 d \sec ^{4}{\left (e + f x \right )}\, dx + \int d \sec ^{5}{\left (e + f x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________